package com.base;

/**
 * @author: sun.hongliang
 * @create: 2018/06/13 15:38
 */
public class CharacterTest {

    public static void main(String[] args) {

        //判断是不是字符
        boolean letter = Character.isLetter(' ');
        boolean letter1 = Character.isLetter('a');

        //判断是否是数字
        boolean digit = Character.isDigit('a');
        boolean digit1 = Character.isDigit('7');

        //判断是否是空格
        boolean whitespace = Character.isWhitespace(' ');

        //判断是否大写
        boolean upperCase = Character.isUpperCase('A');

        //判断是否小写
        boolean lowerCase = Character.isLowerCase('a');

        //转成字符串形式
        String string = Character.toString('a');

        System.out.println(letter);
        System.out.println(letter1);
        System.out.println(digit);
        System.out.println(digit1);
        System.out.println(whitespace);
        System.out.println(upperCase);
        System.out.println(lowerCase);
        System.out.println(string);

    }

}
